<template>
  <div style="width: 100%;height: 100vh">
    <el-container>
      <el-header height="32px" style="padding: 0 !important;">
        <TaskBar/>
      </el-header>
      <el-main class="main">
        <router-view/>
      </el-main>
    </el-container>
  </div>
</template>

<script>

import Settings from "@/components/Settings";
import TaskBar from "@/views/TaskBar";
import {onMounted} from "vue";
import {useStore} from "vuex";

export default {
  name: `App`,
  components: {Settings,TaskBar},
  setup(){
    const store=useStore();
    onMounted(()=>{
      const dataPersistence=require('@/utils/dataPersistence');
      dataPersistence.initUerDB();
      const {password,iv} = dataPersistence.getUserData();
      store.state.password=password;
      store.state.aes.iv=iv;
    })
  }
}
</script>

<style>
html,body,div{
  margin: 0;
  padding: 0;
}
html{
  background-image: url('assets/bg.jpeg');
}
body{
  background-image: linear-gradient(296deg, rgba(247, 240, 172, 0.4), rgba(172, 247, 240, 0.4), rgba(240, 172, 247, 0.4));
}
.main{
  margin: 0 !important;
  padding: 0 !important;
  height: calc(100vh - 32px);
}
</style>
